<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<script type="text/javascript" src="${base}/script/jquery-1.10.2.js"></script>
<title>测试</title>
</head>
<body>
<input type="button" onclick="returnText()" value="点击发送ajax请求返回文本">
<input type="button" onclick="returnJson()" value="点击发送ajax请求返回json">
</body>
<script type="text/javascript">
function returnText() {
	$.ajax({
		url:"${base}/testRenderText.do",
		data:{name:"吴鹏伟"},
		type:"POST",
		success:function(res) {
			alert(res);
		}
	})
};

function returnJson() {
	$.ajax({
		url:"${base}/testRenderJson.do",
		data:{name:"吴鹏伟"},
		type:"POST",
		success:function(res) {
			debugger
			alert(res.message);
		}
	})
}
</script>
</html>